<?php
/**
 * Hols class Image_Lib_Util
 *
 * @author daantimmer
 *
 * @package Library
 * @subpackage Image
 */

/**
 * contains various functions used in the Image Library
 *
 * @author daantimmer
 */
class Image_Lib_Util{

	/**
	 * Returns true if $val is between $min and $max ($min < $val < $max)
	 *
	 * @param float $min
	 * @param float $val
	 * @param float $max
	 * @return boolean
	 */
	public static function between($min,$val,$max){
		return ( $min < $val && $val < $max );
	}

	/**
	 * Returns true if $val is between or equal to $min and $max ($min <= $val <= $max)
	 *
	 * @param float $min
	 * @param float $val
	 * @param float $max
	 * @return boolean
	 */
	public static function equalBetween($min, $val, $max){
		return ( $min <= $val && $val <= $max );
	}
}